gtkbutton: Check release coordinates on all release event types
authorCarlos Garnacho <carlosg@gnome.org>
Fri, 25 Sep 2020 17:10:46 +0000 (19:10 +0200)
committerCarlos Garnacho <carlosg@gnome.org>
Fri, 25 Sep 2020 17:20:04 +0000 (19:20 +0200)
commitea6e575901118711be5301858de631ad13832d6f
tree45960cf74f85bcc93e0d0a63dabbb685c01c4518
parent0ccdbfd8029b0af89a46d077521f5ca1128b8014
gtkbutton: Check release coordinates on all release event types

The priv->in_button state that used to be relied upon for pointer
events has been reduced over time to a broken state, since the button
does not track crossing events anymore.

Make the coordinate-based checks apply for pointer events too, besides
touch events. This fixes GtkButton mistakenly emitting ::clicked with
pointer button releases outside the widget.

Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/3121
gtk/gtkbutton.c